package com.xujl.mvcbind.adapter;

import android.widget.CheckBox;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xujl.fastlib.base.BaseRvAdapter;
import com.xujl.mvcbind.R;
import com.xujl.mvcbind.bean.ListBean;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * @author x
 * @Description
 */
public class ListAdapter extends BaseRvAdapter<ListBean> {
    public ListAdapter (@Nullable List<ListBean> data) {
        super(R.layout.item_list, data);
    }

    @Override
    protected void convert (BaseViewHolder helper, ListBean item) {
        helper.setText(R.id.cb, item.getTitle());
        ((CheckBox) helper.getView(R.id.cb)).setChecked(item.isChecked());
    }
}
